Stratified trend tests are invoked in the STRATA statement in the LIFETEST procedure with the GROUP= and TREND options. This syntax produces results in SAS 9.1 but does not work in SAS 9.2 TS1M0. In SAS 9.2 TS1M0, a NOTE occurs that says the procedure step stops due to errors but no bona fide ERROR messages are produced.
Currently, the only circumvention is to run the stratified trend test in SAS 9.1 or in SAS 9.2 TS2M0.
Product Family | Product | System | SAS Release | |
Reported | Fixed* | |||
SAS System | SAS/STAT | Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | 9.2 TS2M0 |
z/OS | 9.2 TS1M0 | 9.2 TS2M0 | ||
Solaris for x64 | 9.2 TS1M0 | 9.2 TS2M0 | ||
OpenVMS on HP Integrity | 9.2 TS1M0 | 9.2 TS2M0 | ||
Linux for x64 | 9.2 TS1M0 | 9.2 TS2M0 | ||
Linux | 9.2 TS1M0 | 9.2 TS2M0 | ||
HP-UX IPF | 9.2 TS1M0 | 9.2 TS2M0 | ||
64-bit Enabled Solaris | 9.2 TS1M0 | 9.2 TS2M0 | ||
64-bit Enabled HP-UX | 9.2 TS1M0 | 9.2 TS2M0 | ||
64-bit Enabled AIX | 9.2 TS1M0 | 9.2 TS2M0 | ||
Windows Vista | 9.2 TS1M0 | 9.2 TS2M0 | ||
Microsoft Windows XP Professional | 9.2 TS1M0 | 9.2 TS2M0 | ||
Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | 9.2 TS2M0 | ||
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | 9.2 TS2M0 | ||
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | 9.2 TS2M0 | ||
Microsoft® Windows® for x64 | 9.2 TS1M0 | 9.2 TS2M0 | ||
Microsoft Windows XP 64-bit Edition | 9.2 TS1M0 | 9.2 TS2M0 | ||
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | 9.2 TS2M0 | ||
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | 9.2 TS2M0 |
options ls=80 ps=58 nodate pageno=1 number center;
ods trace off;
ods select all;
ods listing;
title1"";
run;
/*******************************************************************/
/* PROGRAM: LIFETEST.stratified_trend_test.sas */
/* AUTHOR: Paul T. Savarese, Technical Support-Statistics */
/* DATE: June 2008 */
/* */
/* PURPOSE: */
/* */
/* Stratified tests are had via the syntax: */
/* proc lifetest data=melanoma notable; */
/* STRATA agegrp / GROUP=trtgrp; */
/* TIME time*fail(0); */
/* run; */
/* */
/* This program adds the TREND option to produce stratified trend */
/* tests: */
/* */
/* proc lifetest data=melanoma notable; */
/* STRATA agegrp / GROUP=trtgrp TREND; */
/* TIME time*fail(0); */
/* run; */
/* */
/* */
/* References: */
/* ----------- */
/* Collett, D. (1994) Modelling Survival Data in Medical Research */
/* London, Chapman & Hall. */
/* */
/* Klein, John W. and Moeschberger, Melvin L.(1997) Survival */
/* Analysis - Techniques for Censored and Truncated Data, */
/* Springer-Verlag, New York, NY */
/* */
/* */
/* DISCLAIMERS: */
/* ============ */
/* */
/* THIS MATERIAL IS PROVIDED BY SAS INSTITUTE INC. "AS IS". The */
/* Institute has not necessarily tested this material, and use of */
/* the material is at Recipient's own risk. The Institute is under*/
/* no obligation to maintain or support this material. Recipient */
/* acknowledges and agrees that the Institute has no liability for */
/* any damages whatsoever arising out of Recipient's use of or */
/* inability to use this material, even if the Institute has been */
/* advised of the possibility of such damages. */
/* */
/* There are no warranties, expressed or implied, as to the */
/* merchantability or fitness for a particular purpose regarding */
/* the accuracy of the materials or code contained herein. */
/* */
/* */
/* Note that in general, Technical Support is not able to provide */
/* programming services or consulting services for SAS customers. */
/* However sometimes we may choose to demonstrate concepts using */
/* test programs such as this one. You may need to modify this */
/* program yourself in order to meet the specifications of your */
/* own problem. */
/* */
/*******************************************************************/
proc format;
value agegroup 1="21-40"
2="40-60"
3="60+";
value rx 1="1_BCG"
2="2_c_parvum";
run;
/* data given in Table 2.8 page 48 of Collett (1994) */
data melanoma;
input agegrp treatgrp time;
format agegrp agegroup.;
format treatgrp rx.;
label treatgrp = 'treatgrp*(K=2 groups)'
agegrp = 'agegrp*(M=3 strata)';
if time < 0 then do;
time= -time;
fail= 0;
end;
else fail= 1;
datalines;
1 1 19
1 1 -24
1 1 8
1 1 -17
1 1 -17
1 1 -34
1 2 -27
1 2 -21
1 2 -18
1 2 -16
1 2 7
1 2 -12
1 2 24
1 2 8
1 2 -8
2 1 -34
2 1 4
2 1 -17
2 2 8
2 2 -11
2 2 -23
2 2 -12
2 2 -15
2 2 -8
2 2 -8
3 1 10
3 1 5
3 2 -25
3 2 8
3 2 -11
;
run;
proc sort data=melanoma;
by agegrp treatgrp time;
proc print data=melanoma label split='*';
by agegrp;
id agegrp;
var treatgrp time fail;
title1 "melanoma data";
title2 "test homogeneity of survival curves for treatgrp (K=2 samples or groups)";
title3 "stratified by levels of agegrp (M=3 strata) in order to test";
title4 "Ho: S_1s(t) = S_2s(t) = ... = S_Ks(t) s= 1,2,3...,M";
title5 "see Section 7.5 of Klein & Moeschberger(1997)";
run;
quit;
/***********************************/
/* LIFETEST stratified test syntax */
/***********************************/
ods select HomTests;
proc lifetest data=melanoma notable;
strata agegrp / group=treatgrp;
time time*fail(0);
title1 "Statified tests from PROC LIFETEST (Version = &sysver)";
title3 "proc lifetest data=melanoma notable;";
title4 " strata agegrp / group=treatgrp;";
title5 " time time*fail(0); ";
run;
quit;
/*****************************************/
/* LIFETEST stratified TREND test syntax */
/*****************************************/
ods select TrendTests TrendScores;
proc lifetest data=melanoma notable;
strata agegrp / group=treatgrp TREND;
time time*fail(0);
title1 "Statified TREND tests from PROC LIFETEST (Version = &sysver)";
title3 "proc lifetest data=melanoma notable; ";
title4 " strata agegrp / group=treatgrp TREND;";
title5 " time time*fail(0); ";
run;
quit;
melanoma data 1 test homogeneity of survival curves for treatgrp (K=2 samples or groups) stratified by levels of agegrp (M=3 strata) in order to test Ho: S_1s(t) = S_2s(t) = ... = S_Ks(t) s= 1,2,3...,M see Section 7.5 of Klein & Moeschberger(1997) agegrp treatgrp (M=3 strata) (K=2 groups) time fail 21-40 1_BCG 8 1 1_BCG 17 0 1_BCG 17 0 1_BCG 19 1 1_BCG 24 0 1_BCG 34 0 2_c_parvum 7 1 2_c_parvum 8 1 2_c_parvum 8 0 2_c_parvum 12 0 2_c_parvum 16 0 2_c_parvum 18 0 2_c_parvum 21 0 2_c_parvum 24 1 2_c_parvum 27 0 40-60 1_BCG 4 1 1_BCG 17 0 1_BCG 34 0 2_c_parvum 8 1 2_c_parvum 8 0 2_c_parvum 8 0 2_c_parvum 11 0 2_c_parvum 12 0 2_c_parvum 15 0 2_c_parvum 23 0 60+ 1_BCG 5 1 1_BCG 10 1 2_c_parvum 8 1 2_c_parvum 11 0 2_c_parvum 25 0 Statified tests from PROC LIFETEST (Version = 9.1) 2 proc lifetest data=melanoma notable; strata agegrp / group=treatgrp; time time*fail(0); The LIFETEST Procedure Stratified Test of Equality over Group Pr > Test Chi-Square DF Chi-Square Log-Rank 0.6882 1 0.4068 Wilcoxon 0.1786 1 0.6726 Statified TREND tests from PROC LIFETEST (Version = 9.1) 3 proc lifetest data=melanoma notable; strata agegrp / group=treatgrp TREND; time time*fail(0); The LIFETEST Procedure Scores for Trend Test treatgrp Score 1_BCG 1 2_c_parvum 2 Trend Tests Test Standard Test Statistic Error z-Score Pr > |z| Log-Rank -1.2373 1.4915 -0.8295 0.4068 Wilcoxon -6.0000 14.1991 -0.4226 0.6726
Type: | Problem Note |
Priority: | high |
Topic: | Analytics ==> Survival Analysis SAS Reference ==> Procedures ==> LIFETEST |
Date Modified: | 2008-07-22 16:21:46 |
Date Created: | 2008-06-25 13:25:54 |